/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package chat;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Jeffom
 */
public class Servidor implements Runnable{
    Socket s;
    String nome;
    ServerSocket servidor;
    ObjectInputStream in;
    ObjectOutputStream out;
    Pacote pack;    
    
    //Acessores    
    public Pacote getPack()
    {
        return pack;
    }
    
    public Socket getSocket()
    {
        return s;
    }
    
    public void setNome(String value)
    {
        nome = value;
    }
    public String getNome()
    {
        return nome;
    }
    
    
    //Métodos
    public boolean CriarServer() throws IOException
    {
        servidor = new ServerSocket (1234);    
        s = servidor.accept();
        
        if( s.isConnected() )
            return true;
        else
            return false;
    }

    public void run()
    {

    }
    
}
